package com.wang.controller;

import com.aaa.entity.TbHeadNav;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wang.service.TbHeadNayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/home/headNav")
public class TbHeadNayController {
    @Autowired
    private TbHeadNayService tbHeadNayService;
    @GetMapping("/headNavigation")
    public Result headNavigation(){
        QueryWrapper<TbHeadNav> wrapper = new QueryWrapper<>();
        wrapper.eq("is_disable",0);
        List<TbHeadNav> list = tbHeadNayService.list(wrapper);
        System.out.println(list);
        return new Result(2000,"查询成功",list);
    }



}
